<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Bai 2.9</title>
</head>

<body>
<?php
	if(isset($_POST["toan"])&&isset($_POST["ly"])&&isset($_POST["hoa"])&&isset($_POST["diemChuan"]))
	{
		$toan=$_POST["toan"];
		$ly=$_POST["ly"];
		$hoa=$_POST["hoa"];
		$diemChuan=$_POST["diemChuan"];
		$tongDiem=$toan+$ly+$hoa;
		$kq=$toan>0&&$ly>0&&$hoa>0&&$tongDiem>$diemChuan?"Đậu":"Rớt";		
	}
?>
<form id="form1" name="form1" method="post" action="Bai2_9.php">
  <table width="350" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr bgcolor="#99FF00">
      <td colspan="2" style="text-align: center; font-weight: bold; font-style: italic;">KẾT QUẢ THI ĐẠI HỌC</td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#B649A3">Toán:</td>
      <td nowrap="nowrap" bgcolor="#B649A3"><input name="toan" type="text" id="toan" value="<?php echo $_POST["toan"]; ?>" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#B649A3">Lý:</td>
      <td nowrap="nowrap" bgcolor="#B649A3"><input name="ly" type="text" id="ly" value="<?php echo $_POST["ly"]; ?>" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#B649A3">Hóa:</td>
      <td nowrap="nowrap" bgcolor="#B649A3"><input name="hoa" type="text" id="hoa" value="<?php echo $_POST["hoa"]; ?>" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#B649A3">Điểm chuẩn:</td>
      <td nowrap="nowrap" bgcolor="#B649A3"><input name="diemChuan" type="text" id="diemChuan" value="<?php echo $_POST["diemChuan"]; ?>" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#B649A3">Tổng điểm:</td>
      <td nowrap="nowrap" bgcolor="#B649A3"><input style="background-color:#FF9" name="tongDiem" type="text" id="tongDiem" value="<?php echo $tongDiem;?>" readonly="readonly" /></td>
    </tr>
    <tr>
      <td nowrap="nowrap" bgcolor="#B649A3">Kết quả thi:</td>
      <td nowrap="nowrap" bgcolor="#B649A3"><input name="kq" type="text" style="background-color:#FF9" id="kq" value="<?php echo $kq;?>" readonly="readonly" /></td>
    </tr>
    <tr style="text-align: center">
      <td colspan="2" nowrap="nowrap" bgcolor="#B649A3"><input type="submit" name="submit" id="submit" value="Xem kết quả" /></td>
    </tr>
  </table>
</form>
</body>
</html>